package com.hospital.service;

import com.hospital.entity.User;
import com.hospital.entity.UserDepartment;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface UserDepartmentService {
    /**
     * 查所有科室
     *
     * @return 集合中的科室对象
     */
    public List<UserDepartment> SelectAllDepartment();

    /**
     * 修改用户科室方法
     *
     * @param userId       用户id
     * @param departmentId 科室id
     * @param deleteState  删除状态
     * @return 修改状态
     */
    public Integer UpdateDepartment(Integer userId, Integer departmentId, Integer deleteState);

    /**
     * 查询用户对应的所有科室
     *
     * @param id                      userId
     * @param responsibleDepartmentId 科室id
     * @return 用户对应的所有科室信息
     */
    public List<UserDepartment> SelectDepartment(Integer id, Integer responsibleDepartmentId);

    /**
     * 添加用户对应的科室
     *
     * @param userDepartment 用户对应科室对象
     * @return 添加状态
     */
    public Integer InsertDepartment(UserDepartment userDepartment);


    /**
     * 删除用户对应科室
     *
     * @param userId 用户id
     * @return 删除状态
     */
    public Integer DeleteDepartment(Integer userId);

    /**
     * 用户姓名与科室查询
     *
     * @param name       用户姓名
     * @param department 科室
     * @return 用户信息
     */
    public List<User> SelectByNameDepartment(String name, String department);

}
